package com.river.boot.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.river.boot.common.base.Option;
import com.river.boot.system.model.entity.User;
import com.river.boot.system.model.form.PasswordUpdateForm;
import com.river.boot.system.model.form.UserForm;
import com.river.boot.system.model.form.UserProfileForm;
import com.river.boot.system.model.query.UserPageQuery;
import com.river.boot.system.model.vo.UserDetailsVO;
import com.river.boot.system.model.vo.UserPageVO;
import com.river.boot.system.model.vo.UserProfileVO;

import java.util.List;

/**
 * @author xiang
 * @description 针对表【sys_user(用户表)】的数据库操作Service
 * @createDate 2025-03-20 15:23:50
 */
public interface UserService extends IService<User> {

    Page<UserPageVO> getUserPage(UserPageQuery queryParams);

    UserForm getUserById(Long id);

    UserDetailsVO getUserDetailsById(Long id);

    Long saveUser(UserForm userForm);

    void deleteUserById(Long id);

    UserDetailsVO me();

    boolean updateUser(Long id, UserForm userForm);

    List<Option<String>> listUserOptions();

    void deleteUserByIds(String idsStr);

    UserProfileVO getUserProfile(Long userId);

    boolean changePassword(Long userId, PasswordUpdateForm data);

    boolean updateUserProfile(UserProfileForm formData);

    boolean resetPassword(Long userId, String password);
}
